package com.machine.dao.user;

import java.util.List;

import com.machine.bean.Componentpart;
import com.machine.bean.Model;

public interface ComponentDao {
	public Integer add(Componentpart component);

	public int delete(Componentpart component);
	public Componentpart findById(Integer id);
	public int deleteByIdList(List<Integer> idList);

	public int update(Componentpart component);

	public List<Componentpart> find(String name,int offset, int length);
	public List<Componentpart> findAll();
	
	public List<Componentpart> findByTag(String tag,String keywords);
	public List<Componentpart> findByPrice(String tag,String keywords,String order);
	public List<Componentpart> findBySell(String tag,String keywords,String order);
	public List<Componentpart> findByPro(String tag,String keywords,String order);
	public List<Componentpart> findByTime(String tag,String keywords,String order);
	public int getAllRowCount(String hql);
	public List queryForPage(final String hql, final int offset, final int length);
	
	
	public void insertNewKeywords(String keywords);
	
	public int uploadModel(Model model);
	
	public List<Model> findModel(String name,int offset, int length);
	public int addModel(int id, String path);
	
}
